<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>营养师 - 饮食营养管理系统</title>
    <!-- TailwindCSS CDN -->
    <script src="https://cdn.tailwindcss.com"></script>
    <!-- FontAwesome CDN -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css">
    <!-- Vue.js CDN -->
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body class="bg-gray-50">
    <div id="app" class="min-h-screen flex flex-col">
        <!-- 顶部导航栏 -->
        <nav class="bg-emerald-600 text-white shadow-md">
            <div class="container mx-auto px-4 py-3 flex justify-between items-center">
                <div class="flex items-center space-x-2">
                    <i class="fas fa-leaf text-2xl"></i>
                    <span class="text-xl font-bold">营养师后台管理系统</span>
                </div>
                <div class="flex items-center space-x-4">
                    <a href="#" class="hover:text-emerald-200">
                        <i class="fas fa-bell"></i>
                        <span class="bg-red-500 text-white rounded-full w-5 h-5 text-xs flex items-center justify-center absolute -mt-8 ml-3">3</span>
                    </a>
                    <div class="relative group">
                        <div class="flex items-center space-x-2 cursor-pointer">
                            <img src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=150&h=150&q=80" 
                                class="w-8 h-8 rounded-full object-cover" alt="用户头像">
                            <span>管理员</span>
                            <i class="fas fa-chevron-down text-xs"></i>
                        </div>
                        <div class="absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-1 z-50 hidden group-hover:block">
                            <a href="#" class="block px-4 py-2 text-gray-800 hover:bg-emerald-100">
                                <i class="fas fa-user mr-2"></i>个人信息
                            </a>
                            <a href="#" class="block px-4 py-2 text-gray-800 hover:bg-emerald-100">
                                <i class="fas fa-cog mr-2"></i>系统设置
                            </a>
                            <div class="border-t border-gray-200 my-1"></div>
                            <a href="#" class="block px-4 py-2 text-gray-800 hover:bg-emerald-100">
                                <i class="fas fa-sign-out-alt mr-2"></i>退出登录
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </nav>

        <!-- 主要内容区 -->
        <div class="flex flex-1">
            <!-- 侧边导航 -->
            <aside class="bg-white w-64 shadow-md">
                <div class="p-4">
                    <div class="relative">
                        <span class="absolute inset-y-0 left-0 flex items-center pl-3">
                            <i class="fas fa-search text-gray-400"></i>
                        </span>
                        <input type="text" class="pl-10 pr-4 py-2 w-full rounded-md border border-gray-300 focus:outline-none focus:ring-2 focus:ring-emerald-500 focus:border-emerald-500" 
                            placeholder="搜索...">
                    </div>
                </div>
                <nav class="mt-2">
                    <a href="index.html" class="flex items-center px-4 py-3 text-emerald-600 bg-emerald-50 border-l-4 border-emerald-600">
                        <i class="fas fa-home mr-3"></i>
                        <span>仪表盘</span>
                    </a>
                    <a href="users.html" class="flex items-center px-4 py-3 text-gray-700 hover:bg-gray-50 hover:text-emerald-600">
                        <i class="fas fa-users mr-3"></i>
                        <span>用户管理</span>
                    </a>
                    <a href="foods.html" class="flex items-center px-4 py-3 text-gray-700 hover:bg-gray-50 hover:text-emerald-600">
                        <i class="fas fa-apple-alt mr-3"></i>
                        <span>食物数据库</span>
                    </a>
                    <a href="recipes.html" class="flex items-center px-4 py-3 text-gray-700 hover:bg-gray-50 hover:text-emerald-600">
                        <i class="fas fa-utensils mr-3"></i>
                        <span>食谱管理</span>
                    </a>
                    <a href="diet-records.html" class="flex items-center px-4 py-3 text-gray-700 hover:bg-gray-50 hover:text-emerald-600">
                        <i class="fas fa-clipboard-list mr-3"></i>
                        <span>饮食记录</span>
                    </a>
                    <a href="nutrition.html" class="flex items-center px-4 py-3 text-gray-700 hover:bg-gray-50 hover:text-emerald-600">
                        <i class="fas fa-chart-pie mr-3"></i>
                        <span>营养分析</span>
                    </a>
                    <a href="settings.html" class="flex items-center px-4 py-3 text-gray-700 hover:bg-gray-50 hover:text-emerald-600">
                        <i class="fas fa-cog mr-3"></i>
                        <span>系统设置</span>
                    </a>
                </nav>
            </aside>

            <!-- 主内容 -->
            <main class="flex-1 p-6">
                <div class="mb-6">
                    <h1 class="text-2xl font-bold text-gray-800">仪表盘</h1>
                    <p class="text-gray-600">欢迎回来，管理员！这是您的实时数据概览。</p>
                </div>

                <!-- 数据卡片 -->
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
                    <div class="bg-white rounded-lg shadow-md p-6">
                        <div class="flex items-center justify-between">
                            <div>
                                <p class="text-gray-500">用户总数</p>
                                <h3 class="text-3xl font-bold text-gray-800">2,563</h3>
                            </div>
                            <div class="bg-emerald-100 rounded-full w-12 h-12 flex items-center justify-center">
                                <i class="fas fa-users text-emerald-600 text-xl"></i>
                            </div>
                        </div>
                        <p class="mt-4 text-green-600"><i class="fas fa-arrow-up mr-1"></i> 8.2% <span class="text-gray-500">本周增加</span></p>
                    </div>
                    
                    <div class="bg-white rounded-lg shadow-md p-6">
                        <div class="flex items-center justify-between">
                            <div>
                                <p class="text-gray-500">食物数据</p>
                                <h3 class="text-3xl font-bold text-gray-800">1,128</h3>
                            </div>
                            <div class="bg-blue-100 rounded-full w-12 h-12 flex items-center justify-center">
                                <i class="fas fa-apple-alt text-blue-600 text-xl"></i>
                            </div>
                        </div>
                        <p class="mt-4 text-green-600"><i class="fas fa-arrow-up mr-1"></i> 3.1% <span class="text-gray-500">本月增加</span></p>
                    </div>
                    
                    <div class="bg-white rounded-lg shadow-md p-6">
                        <div class="flex items-center justify-between">
                            <div>
                                <p class="text-gray-500">食谱总数</p>
                                <h3 class="text-3xl font-bold text-gray-800">437</h3>
                            </div>
                            <div class="bg-purple-100 rounded-full w-12 h-12 flex items-center justify-center">
                                <i class="fas fa-utensils text-purple-600 text-xl"></i>
                            </div>
                        </div>
                        <p class="mt-4 text-green-600"><i class="fas fa-arrow-up mr-1"></i> 12.4% <span class="text-gray-500">本月增加</span></p>
                    </div>
                    
                    <div class="bg-white rounded-lg shadow-md p-6">
                        <div class="flex items-center justify-between">
                            <div>
                                <p class="text-gray-500">今日饮食记录</p>
                                <h3 class="text-3xl font-bold text-gray-800">872</h3>
                            </div>
                            <div class="bg-amber-100 rounded-full w-12 h-12 flex items-center justify-center">
                                <i class="fas fa-clipboard-list text-amber-600 text-xl"></i>
                            </div>
                        </div>
                        <p class="mt-4 text-red-600"><i class="fas fa-arrow-down mr-1"></i> 2.5% <span class="text-gray-500">昨日对比</span></p>
                    </div>
                </div>

                <!-- 图表和统计 -->
                <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6">
                    <!-- 用户活跃度图表 -->
                    <div class="bg-white rounded-lg shadow-md p-6">
                        <div class="flex items-center justify-between mb-4">
                            <h4 class="text-lg font-medium text-gray-800">用户活跃度趋势</h4>
                            <div class="flex items-center space-x-2">
                                <select class="border rounded-md px-2 py-1 text-sm">
                                    <option>过去7天</option>
                                    <option>过去30天</option>
                                    <option>过去90天</option>
                                </select>
                            </div>
                        </div>
                        <div class="h-64 flex items-center justify-center bg-gray-50 rounded">
                            <!-- 图表示意 -->
                            <div class="w-full h-full p-4">
                                <div class="flex h-full items-end justify-around">
                                    <div class="w-8 bg-emerald-500 rounded-t" style="height: 40%">
                                        <div class="text-xs text-center mt-2">周一</div>
                                    </div>
                                    <div class="w-8 bg-emerald-500 rounded-t" style="height: 65%">
                                        <div class="text-xs text-center mt-2">周二</div>
                                    </div>
                                    <div class="w-8 bg-emerald-500 rounded-t" style="height: 45%">
                                        <div class="text-xs text-center mt-2">周三</div>
                                    </div>
                                    <div class="w-8 bg-emerald-500 rounded-t" style="height: 80%">
                                        <div class="text-xs text-center mt-2">周四</div>
                                    </div>
                                    <div class="w-8 bg-emerald-500 rounded-t" style="height: 75%">
                                        <div class="text-xs text-center mt-2">周五</div>
                                    </div>
                                    <div class="w-8 bg-emerald-500 rounded-t" style="height: 55%">
                                        <div class="text-xs text-center mt-2">周六</div>
                                    </div>
                                    <div class="w-8 bg-emerald-500 rounded-t" style="height: 30%">
                                        <div class="text-xs text-center mt-2">周日</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- 营养摄入分布 -->
                    <div class="bg-white rounded-lg shadow-md p-6">
                        <div class="flex items-center justify-between mb-4">
                            <h4 class="text-lg font-medium text-gray-800">平均营养素摄入分布</h4>
                            <div class="flex items-center space-x-2">
                                <select class="border rounded-md px-2 py-1 text-sm">
                                    <option>本周</option>
                                    <option>本月</option>
                                    <option>全年</option>
                                </select>
                            </div>
                        </div>
                        <div class="h-64 flex items-center justify-center">
                            <!-- 圆形图表示意 -->
                            <div class="relative w-48 h-48">
                                <div class="absolute inset-0 rounded-full border-8 border-emerald-500" style="clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 0)"></div>
                                <div class="absolute inset-0 rounded-full border-8 border-amber-500" style="clip-path: polygon(50% 50%, 100% 50%, 100% 100%, 50% 100%)"></div>
                                <div class="absolute inset-0 rounded-full border-8 border-blue-500" style="clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 50%)"></div>
                                <div class="absolute inset-0 flex items-center justify-center">
                                    <div class="w-36 h-36 rounded-full bg-white"></div>
                                </div>
                            </div>
                            <div class="ml-8 space-y-2">
                                <div class="flex items-center">
                                    <div class="w-4 h-4 bg-emerald-500 rounded-full mr-2"></div>
                                    <span class="text-sm">蛋白质 (30%)</span>
                                </div>
                                <div class="flex items-center">
                                    <div class="w-4 h-4 bg-amber-500 rounded-full mr-2"></div>
                                    <span class="text-sm">脂肪 (25%)</span>
                                </div>
                                <div class="flex items-center">
                                    <div class="w-4 h-4 bg-blue-500 rounded-full mr-2"></div>
                                    <span class="text-sm">碳水化合物 (45%)</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 最近活动和热门食谱 -->
                <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
                    <!-- 最近活动 -->
                    <div class="bg-white rounded-lg shadow-md p-6">
                        <h4 class="text-lg font-medium text-gray-800 mb-4">最近活动</h4>
                        <div class="space-y-4">
                            <div class="flex">
                                <div class="flex-shrink-0 mr-3">
                                    <div class="w-10 h-10 rounded-full bg-green-100 flex items-center justify-center">
                                        <i class="fas fa-user-plus text-green-600"></i>
                                    </div>
                                </div>
                                <div>
                                    <p class="text-gray-800">新用户注册</p>
                                    <p class="text-gray-500 text-sm">张小明刚刚注册了账号</p>
                                    <p class="text-gray-400 text-xs mt-1">2分钟前</p>
                                </div>
                            </div>
                            <div class="border-t border-gray-100"></div>
                            <div class="flex">
                                <div class="flex-shrink-0 mr-3">
                                    <div class="w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center">
                                        <i class="fas fa-utensils text-blue-600"></i>
                                    </div>
                                </div>
                                <div>
                                    <p class="text-gray-800">新食谱发布</p>
                                    <p class="text-gray-500 text-sm">管理员发布了"低脂香煎鸡胸肉"食谱</p>
                                    <p class="text-gray-400 text-xs mt-1">35分钟前</p>
                                </div>
                            </div>
                            <div class="border-t border-gray-100"></div>
                            <div class="flex">
                                <div class="flex-shrink-0 mr-3">
                                    <div class="w-10 h-10 rounded-full bg-amber-100 flex items-center justify-center">
                                        <i class="fas fa-star text-amber-600"></i>
                                    </div>
                                </div>
                                <div>
                                    <p class="text-gray-800">食物数据更新</p>
                                    <p class="text-gray-500 text-sm">更新了15种食物的营养数据</p>
                                    <p class="text-gray-400 text-xs mt-1">1小时前</p>
                                </div>
                            </div>
                            <div class="border-t border-gray-100"></div>
                            <div class="flex">
                                <div class="flex-shrink-0 mr-3">
                                    <div class="w-10 h-10 rounded-full bg-purple-100 flex items-center justify-center">
                                        <i class="fas fa-clipboard-check text-purple-600"></i>
                                    </div>
                                </div>
                                <div>
                                    <p class="text-gray-800">系统维护完成</p>
                                    <p class="text-gray-500 text-sm">系统例行维护和性能优化已完成</p>
                                    <p class="text-gray-400 text-xs mt-1">2小时前</p>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- 热门食谱 -->
                    <div class="bg-white rounded-lg shadow-md p-6">
                        <h4 class="text-lg font-medium text-gray-800 mb-4">热门食谱</h4>
                        <div class="space-y-4">
                            <div class="flex">
                                <img src="https://images.unsplash.com/photo-1546069901-ba9599a7e63c?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=100&h=100&q=80" 
                                    class="w-16 h-16 object-cover rounded-md mr-3" alt="食谱图片">
                                <div>
                                    <p class="text-gray-800 font-medium">蔬菜沙拉配柠檬汁</p>
                                    <div class="flex items-center mt-1">
                                        <div class="flex">
                                            <i class="fas fa-star text-yellow-400"></i>
                                            <i class="fas fa-star text-yellow-400"></i>
                                            <i class="fas fa-star text-yellow-400"></i>
                                            <i class="fas fa-star text-yellow-400"></i>
                                            <i class="fas fa-star text-yellow-400"></i>
                                        </div>
                                        <span class="text-gray-500 text-sm ml-2">4.9 (128条评价)</span>
                                    </div>
                                    <p class="text-gray-500 text-sm mt-1">浏览量: 2,341</p>
                                </div>
                            </div>
                            <div class="border-t border-gray-100"></div>
                            <div class="flex">
                                <img src="https://images.unsplash.com/photo-1555939594-58d7cb561ad1?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=100&h=100&q=80" 
                                    class="w-16 h-16 object-cover rounded-md mr-3" alt="食谱图片">
                                <div>
                                    <p class="text-gray-800 font-medium">低脂香煎鸡胸肉</p>
                                    <div class="flex items-center mt-1">
                                        <div class="flex">
                                            <i class="fas fa-star text-yellow-400"></i>
                                            <i class="fas fa-star text-yellow-400"></i>
                                            <i class="fas fa-star text-yellow-400"></i>
                                            <i class="fas fa-star text-yellow-400"></i>
                                            <i class="fas fa-star-half-alt text-yellow-400"></i>
                                        </div>
                                        <span class="text-gray-500 text-sm ml-2">4.7 (92条评价)</span>
                                    </div>
                                    <p class="text-gray-500 text-sm mt-1">浏览量: 1,958</p>
                                </div>
                            </div>
                            <div class="border-t border-gray-100"></div>
                            <div class="flex">
                                <img src="https://images.unsplash.com/photo-1565958011703-44f9829ba187?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=100&h=100&q=80" 
                                    class="w-16 h-16 object-cover rounded-md mr-3" alt="食谱图片">
                                <div>
                                    <p class="text-gray-800 font-medium">燕麦水果早餐碗</p>
                                    <div class="flex items-center mt-1">
                                        <div class="flex">
                                            <i class="fas fa-star text-yellow-400"></i>
                                            <i class="fas fa-star text-yellow-400"></i>
                                            <i class="fas fa-star text-yellow-400"></i>
                                            <i class="fas fa-star text-yellow-400"></i>
                                            <i class="far fa-star text-yellow-400"></i>
                                        </div>
                                        <span class="text-gray-500 text-sm ml-2">4.2 (76条评价)</span>
                                    </div>
                                    <p class="text-gray-500 text-sm mt-1">浏览量: 1,495</p>
                                </div>
                            </div>
                        </div>
                        <div class="mt-4 text-center">
                            <a href="#" class="text-emerald-600 hover:text-emerald-700 text-sm font-medium">查看所有热门食谱</a>
                        </div>
                    </div>
                </div>
            </main>
        </div>
    </div>

    <script>
        const app = Vue.createApp({
            data() {
                return {
                    // 组件数据
                };
            },
            methods: {
                // 组件方法
            }
        });
        
        app.mount('#app');
    </script>
</body>
</html> 